package com.yehee.chainserver.common.entity;

import java.io.Serializable;

/**
 * Created by wx on 2017/8/23.
 */
public class BaseResponse implements Serializable {
    private int status = 200;
    private Object message;

    public BaseResponse(int status, String message) {
        this.status = status;
        this.message = message;
    }


    public BaseResponse() {
    }
    public static BaseResponse ok(){
        BaseResponse baseResponse=new BaseResponse();
        baseResponse.setStatus(200);
        return baseResponse;

    }
    public  BaseResponse message(Serializable message){
        this.message=message;
        return this;

    }
    public static BaseResponse makeBaseResponse(int status,Object message){
        BaseResponse baseResponse=new BaseResponse();
        baseResponse.setStatus(status);
        baseResponse.setMessage(message);
        return baseResponse;

    }
    public Object getMessage() {
        return message;
    }

    public void setMessage(Object message) {
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }


}
